<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
<%@ page import="co.gov.medellin.ssti.sub.model.vo.AreaVO,java.util.List"%>

<script type="text/javascript"
	src="<%= request.getContextPath() + "/js/calendar6.js" %>"></script>
<script type="text/javascript"
	src="<%= request.getContextPath() + "/js/popUP.js" %>"></script>

<%@ page contentType="text/html;charset=utf-8"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>M&oacute;dulo de Secretarias</title>
<link href="../../css/jdeveloper.css" rel="stylesheet" media="screen" />
<link href="<%= request.getContextPath() + "/css/bloques.css" %>"
	rel="stylesheet" type="text/css">

<script type="text/javascript"> 
       
       function validardatos(locacion1){
        if(document.frmModisecretarias.nombrearea.value != "")
        {
          document.frmModisecretarias.opcion.value='2';
          document.frmModisecretarias.action=locacion1;
          document.frmModisecretarias.submit();          
        }else
        {
          alert("Por favor ingrese el nombre de la secretaría.");
        }
      }
      
      function enviar(locacion1)
      {
        document.frmModisecretarias.action=locacion1;
        document.frmModisecretarias.submit();
      }
              
    </script>

</head>
<body>

	<P align="center" class="titulosenblanco">M&oacute;dulo de
		Secretarias</P>
	<form name="frmModisecretarias" method="get">
		<logic:iterate length="1" id="area" name="ListaArea"
			type="co.gov.medellin.ssti.sub.model.vo.AreaVO">
			<div align="center">
				<table
					style="width: 50%; height: 34; border: 0; padding: 2px; border-spacing: 1px;">
					<tr>
						<td>
							<DIV align="left" class="celdatabla">
								<STRONG>Nombre</STRONG>
							</DIV>
						</td>
						<td><input type="text" name="nombrearea" size="40"
							value="<bean:write name="area" property="nombre"/>"
							maxlength="99" class="form" /></td>
					</tr>
					<tr align="left">
						<td>
							<DIV align="left" class="celdatabla">
								<strong>Descripci&oacute;n</strong>
							</DIV>
						</td>
						<td>
							<DIV align="left">
								<input type="text" name="descripcionarea"
									value="<bean:write name="area" property="descripcion"/>"
									size="40" maxlength="199" class="form" />
							</DIV>
						</td>
					</tr>
				</table>
			</div>
		</logic:iterate>
		<br />
		<logic:present scope="request" name="msgmodificar">
			<DIV align="center">
				<strong><%=(String)request.getAttribute("msgmodificar")%></strong>
			</DIV>
			<BR />
		</logic:present>

		<br />
		<div align="center">
			<%String Ruta = "'"+request.getContextPath() + "/Areas/ModificationAreas.do'";%>
			<input type="HIDDEN" name="opcion" /> <input type="BUTTON"
				value="Modificar" onclick="validardatos(<%=Ruta%>)" /> <br /> <br />
			<% String Ruta2 = "'"+request.getContextPath() + "/Areas/ModuloAreas.do'"; %>
			<input type="image" onclick="enviar(<%=Ruta2%>)"
				src="<%= request.getContextPath() + "/images/b_atras.gif"%>" />
		</div>
		<br />
	</form>
</body>
</html>
